﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;

namespace Hvam.SharePoint.Features.IIS {
    public class IISState : SPPersistedObject {
        [Persisted]
        private string _server;

        [Persisted]
        private Guid _webApplication;

        [Persisted]
        private int _zone;

        [Persisted]
        private int _webSiteState;

        [Persisted]
        private int _applicationPoolState;

        [Persisted]
        private DateTime _timestamp;

        public IISState() : base() {
        }

        public IISState(Guid id, SPPersistedObject parent)
            : base(id.ToString(), parent, id) {
        }

        public string Server {
            get { return _server; }
            set { _server = value; }
        }

        public Guid WebApplication {
            get { return _webApplication; }
            set { _webApplication = value; }
        }

        public int Zone {
            get { return _zone; }
            set { _zone = value; }
        }

        public int WebSiteState {
            get { return _webSiteState; }
            set { _webSiteState = value; }
        }

        public int ApplicationPoolState {
            get { return _applicationPoolState; }
            set { _applicationPoolState = value; }
        }

        public DateTime Timestamp {
            get { return _timestamp; }
            set { _timestamp = value; }
        }
    }
}
